package func;

import java.util.ArrayList;

public class MaxMinFuncs implements FunctionGroup<Double> {
	public ArrayList<Function<Double>> createFunctionGroup() {
		ArrayList<Function<Double>> f = new ArrayList<Function<Double>>();

		f.add(
			new Function<Double>() {
				public Double applyFunction(Double[] param) {
					return Math.min(param[0], param[1]);
				}
				public String description() {
					return "d_min";
				}
				public int paramCount() {
					return 2;
				}			
		});

		f.add(
				new Function<Double>() {
					public Double applyFunction(Double[] param) {
						return Math.max(param[0], param[1]);
					}
					public String description() {
						return "d_max";
					}
					public int paramCount() {
						return 2;
					}			
			});

		
		return f;
	}
	public String description() {
		return "doublemaxmin";
	}
}
